import Vue from 'vue'
import VueRouter from 'vue-router'
import dl from '../views/dl.vue'
import zhu from '../views/zhu.vue'
import guan from '../views/guan.vue'
import yong from '../views/yong.vue'
import ding from '../views/ding.vue'
import cai from '../views/cai.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'dl',
    component: dl
  },
  {
    path: '/dl',
    name: 'dl',
    component: dl
  },
  {
    path: '/guan',
    name: 'guan',
    component: guan,
    children: [
      {path: '/',name: 'shu',component: () => import('../views/shu.vue')},
      {path: '/shu',name: 'shu',component: () => import('../views/shu.vue')},
      {path: '/yong',name: 'yong',component: yong},
      {path: '/ding',name: 'ding',component: ding},
      {path: '/cai',name: 'cai',component: cai},
    ]
  },
  {
    path: '/zhu',
    name: 'zhu',
    component: zhu
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
